package com.luoke.main;

import com.luoke.connect.GameWebSocketClient;

import java.net.URI;
import java.net.URISyntaxException;

/**
 * 客户端启动类
 */
public class ClientMain {

    public static void main(String[] args) {
        try {
            GameWebSocketClient client = new GameWebSocketClient(new URI("ws://localhost:8888"));
            client.setConnectionLostTimeout(300);
            client.connectBlocking(); //启动服务器
        } catch (URISyntaxException | InterruptedException e) {
            System.out.println("无法连接到服务器，请检查网络。");
            throw new RuntimeException(e);
        }

    }


}
